FROM python:3.8

RUN mv /etc/apt/sources.list /etc/apt/sources.list.back
COPY sources.list /etc/apt
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y gcc make vim net-tools lsof
RUN apt-get install -y libgl1-mesa-glx

WORKDIR /proj
COPY . .
ENV PIPURL "https://mirrors.aliyun.com/pypi/simple/"
RUN pip install -r requirements.txt -i ${PIPURL} 
RUN pip install -U https://paddleocr.bj.bcebos.com/whl/layoutparser-0.0.0-py3-none-any.whl -i ${PIPURL}
CMD ["/bin/bash"]